package cn.com.chb.dakele.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimerTask;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


import cn.com.chb.dakele.domain.QianDaoContent;

public class QianDaoTask extends TimerTask {
	private static final Log log = LogFactory.getLog(QianDaoTask.class);
	@Override
	public void run() {
		Dakele dakele = new Dakele();
		dakele.login("240982248@qq.com","qq123123");
		QianDaoContent qd = dakele.sign("http://bbs.dakele.com/dsu_paulsign-sign.html");
		if(qd==null){
			log.info("已签到");
		}else{
			Date date = new Date();
			SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			log.info(sf.format(date)+"---成功签到");
		}
		
	}

}
